
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_BACK_PRIMARY_COLOR_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int BACK_PRIMARY_COLOR_NV = 0x8C77;

		/// <summary>
		/// [GL] Value of GL_BACK_SECONDARY_COLOR_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int BACK_SECONDARY_COLOR_NV = 0x8C78;

		/// <summary>
		/// [GL] Value of GL_TEXTURE_COORD_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int TEXTURE_COORD_NV = 0x8C79;

		/// <summary>
		/// [GL] Value of GL_CLIP_DISTANCE_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int CLIP_DISTANCE_NV = 0x8C7A;

		/// <summary>
		/// [GL] Value of GL_VERTEX_ID_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int VERTEX_ID_NV = 0x8C7B;

		/// <summary>
		/// [GL] Value of GL_PRIMITIVE_ID_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int PRIMITIVE_ID_NV = 0x8C7C;

		/// <summary>
		/// [GL] Value of GL_GENERIC_ATTRIB_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int GENERIC_ATTRIB_NV = 0x8C7D;

		/// <summary>
		/// [GL] Value of GL_TRANSFORM_FEEDBACK_ATTRIBS_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E;

		/// <summary>
		/// [GL] Value of GL_ACTIVE_VARYINGS_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int ACTIVE_VARYINGS_NV = 0x8C81;

		/// <summary>
		/// [GL] Value of GL_ACTIVE_VARYING_MAX_LENGTH_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82;

		/// <summary>
		/// [GL] Value of GL_TRANSFORM_FEEDBACK_RECORD_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86;

		/// <summary>
		/// [GL] Value of GL_LAYER_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int LAYER_NV = 0x8DAA;

		/// <summary>
		/// [GL] Value of GL_NEXT_BUFFER_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int NEXT_BUFFER_NV = -2;

		/// <summary>
		/// [GL] Value of GL_SKIP_COMPONENTS4_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int SKIP_COMPONENTS4_NV = -3;

		/// <summary>
		/// [GL] Value of GL_SKIP_COMPONENTS3_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int SKIP_COMPONENTS3_NV = -4;

		/// <summary>
		/// [GL] Value of GL_SKIP_COMPONENTS2_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int SKIP_COMPONENTS2_NV = -5;

		/// <summary>
		/// [GL] Value of GL_SKIP_COMPONENTS1_NV symbol.
		/// </summary>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public const int SKIP_COMPONENTS1_NV = -6;

		/// <summary>
		/// [GL] glTransformFeedbackAttribsNV: Binding for glTransformFeedbackAttribsNV.
		/// </summary>
		/// <param name="count">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="attribs">
		/// A <see cref="T:int[]"/>.
		/// </param>
		/// <param name="bufferMode">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public static void TransformFeedbackAttribsNV(int count, int[] attribs, int bufferMode)
		{
			unsafe {
				fixed (int* p_attribs = attribs)
				{
					Debug.Assert(Delegates.pglTransformFeedbackAttribsNV != null, "pglTransformFeedbackAttribsNV not implemented");
					Delegates.pglTransformFeedbackAttribsNV(count, p_attribs, bufferMode);
					LogCommand("glTransformFeedbackAttribsNV", null, count, attribs, bufferMode					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glTransformFeedbackVaryingsNV: Binding for glTransformFeedbackVaryingsNV.
		/// </summary>
		/// <param name="program">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="locations">
		/// A <see cref="T:int[]"/>.
		/// </param>
		/// <param name="bufferMode">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public static void TransformFeedbackVaryingsNV(uint program, int[] locations, int bufferMode)
		{
			unsafe {
				fixed (int* p_locations = locations)
				{
					Debug.Assert(Delegates.pglTransformFeedbackVaryingsNV != null, "pglTransformFeedbackVaryingsNV not implemented");
					Delegates.pglTransformFeedbackVaryingsNV(program, locations.Length, p_locations, bufferMode);
					LogCommand("glTransformFeedbackVaryingsNV", null, program, locations.Length, locations, bufferMode					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glActiveVaryingNV: Binding for glActiveVaryingNV.
		/// </summary>
		/// <param name="program">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public static void ActiveVaryingNV(uint program, string name)
		{
			Debug.Assert(Delegates.pglActiveVaryingNV != null, "pglActiveVaryingNV not implemented");
			Delegates.pglActiveVaryingNV(program, name);
			LogCommand("glActiveVaryingNV", null, program, name			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glGetVaryingLocationNV: Binding for glGetVaryingLocationNV.
		/// </summary>
		/// <param name="program">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:string"/>.
		/// </param>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public static int GetVaryingLocationNV(uint program, string name)
		{
			int retValue;

			Debug.Assert(Delegates.pglGetVaryingLocationNV != null, "pglGetVaryingLocationNV not implemented");
			retValue = Delegates.pglGetVaryingLocationNV(program, name);
			LogCommand("glGetVaryingLocationNV", retValue, program, name			);
			DebugCheckErrors(retValue);

			return (retValue);
		}

		/// <summary>
		/// [GL] glGetActiveVaryingNV: Binding for glGetActiveVaryingNV.
		/// </summary>
		/// <param name="program">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="index">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="bufSize">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="length">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="size">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="type">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="name">
		/// A <see cref="T:StringBuilder"/>.
		/// </param>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public static void GetActiveVaryingNV(uint program, uint index, int bufSize, out int length, out int size, out int type, StringBuilder name)
		{
			unsafe {
				fixed (int* p_length = &length)
				fixed (int* p_size = &size)
				fixed (int* p_type = &type)
				{
					Debug.Assert(Delegates.pglGetActiveVaryingNV != null, "pglGetActiveVaryingNV not implemented");
					Delegates.pglGetActiveVaryingNV(program, index, bufSize, p_length, p_size, p_type, name);
					LogCommand("glGetActiveVaryingNV", null, program, index, bufSize, length, size, type, name					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glGetTransformFeedbackVaryingNV: Binding for glGetTransformFeedbackVaryingNV.
		/// </summary>
		/// <param name="program">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="index">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="location">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public static void GetTransformFeedbackVaryingNV(uint program, uint index, out int location)
		{
			unsafe {
				fixed (int* p_location = &location)
				{
					Debug.Assert(Delegates.pglGetTransformFeedbackVaryingNV != null, "pglGetTransformFeedbackVaryingNV not implemented");
					Delegates.pglGetTransformFeedbackVaryingNV(program, index, p_location);
					LogCommand("glGetTransformFeedbackVaryingNV", null, program, index, location					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glTransformFeedbackStreamAttribsNV: Binding for glTransformFeedbackStreamAttribsNV.
		/// </summary>
		/// <param name="attribs">
		/// A <see cref="T:int[]"/>.
		/// </param>
		/// <param name="bufstreams">
		/// A <see cref="T:int[]"/>.
		/// </param>
		/// <param name="bufferMode">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_NV_transform_feedback")]
		public static void TransformFeedbackStreamAttribsNV(int[] attribs, int[] bufstreams, int bufferMode)
		{
			unsafe {
				fixed (int* p_attribs = attribs)
				fixed (int* p_bufstreams = bufstreams)
				{
					Debug.Assert(Delegates.pglTransformFeedbackStreamAttribsNV != null, "pglTransformFeedbackStreamAttribsNV not implemented");
					Delegates.pglTransformFeedbackStreamAttribsNV(attribs.Length, p_attribs, bufstreams.Length, p_bufstreams, bufferMode);
					LogCommand("glTransformFeedbackStreamAttribsNV", null, attribs.Length, attribs, bufstreams.Length, bufstreams, bufferMode					);
				}
			}
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_NV_transform_feedback")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glTransformFeedbackAttribsNV(int count, int* attribs, int bufferMode);

			[RequiredByFeature("GL_NV_transform_feedback")]
			[ThreadStatic]
			internal static glTransformFeedbackAttribsNV pglTransformFeedbackAttribsNV;

			[RequiredByFeature("GL_NV_transform_feedback")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glTransformFeedbackVaryingsNV(uint program, int count, int* locations, int bufferMode);

			[RequiredByFeature("GL_NV_transform_feedback")]
			[ThreadStatic]
			internal static glTransformFeedbackVaryingsNV pglTransformFeedbackVaryingsNV;

			[RequiredByFeature("GL_NV_transform_feedback")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glActiveVaryingNV(uint program, string name);

			[RequiredByFeature("GL_NV_transform_feedback")]
			[ThreadStatic]
			internal static glActiveVaryingNV pglActiveVaryingNV;

			[RequiredByFeature("GL_NV_transform_feedback")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate int glGetVaryingLocationNV(uint program, string name);

			[RequiredByFeature("GL_NV_transform_feedback")]
			[ThreadStatic]
			internal static glGetVaryingLocationNV pglGetVaryingLocationNV;

			[RequiredByFeature("GL_NV_transform_feedback")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glGetActiveVaryingNV(uint program, uint index, int bufSize, int* length, int* size, int* type, StringBuilder name);

			[RequiredByFeature("GL_NV_transform_feedback")]
			[ThreadStatic]
			internal static glGetActiveVaryingNV pglGetActiveVaryingNV;

			[RequiredByFeature("GL_NV_transform_feedback")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glGetTransformFeedbackVaryingNV(uint program, uint index, int* location);

			[RequiredByFeature("GL_NV_transform_feedback")]
			[ThreadStatic]
			internal static glGetTransformFeedbackVaryingNV pglGetTransformFeedbackVaryingNV;

			[RequiredByFeature("GL_NV_transform_feedback")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glTransformFeedbackStreamAttribsNV(int count, int* attribs, int nbuffers, int* bufstreams, int bufferMode);

			[RequiredByFeature("GL_NV_transform_feedback")]
			[ThreadStatic]
			internal static glTransformFeedbackStreamAttribsNV pglTransformFeedbackStreamAttribsNV;

		}
	}

}
